
<div id='wrapper'>
<?php $this->widget('FrontMenuWidget'); ?>
</div>

    <div id="content">
    	<div class="container">
	    	<div class="banner">
            <img src="<?php echo Yii::app()->baseUrl; ?>/timthumb.php?src=/images/cover/<?php echo $sub['CoverPhoto'];?>&amp;h=188&amp;w=220" width="220" height="188">
                <div class="info">
                	<?php
                    echo $sub['Descriptions'];
                    ?>
                </div>
            </div>
            <div class="breadcrumb">
            	<a href="/">Trang chủ</a> / 
                <a href="<?php echo Yii::app()->params['linkGX'];?>/<?php echo $sub['category']['CateNameRewrite']?>.html"><?php echo $sub['category']['CategoryName']?></a> / 
                <a href="<?php echo Yii::app()->params['linkGX'];?>/danh-muc-san-pham/<?php echo $sub['SubCateNameRewrite'] .'-'. $sub['SubCateId']?>.html"><?php echo $sub['SubCateName']?></a>
            </div>
            <div class="clear"></div>
            <?php $this->widget('SidebarWidget'); ?>
            
            <div id="main-content" class="fr">
            	<h3 class="title">GIÀY BÚP BÊ</h3>
                <div class="fl result">Kết quả 1 tới <span>50</span> trong tổng số <span>199</span></div>
                <div class="fr filter">
                	SẮP XẾP THEO:
                	<select class="f-price" id="orderDisplay">
                    	<option value="ASC">Giá thấp đến cao</option>
                        <option value="DESC">Giá cao đến thấp</option>
                    </select>
                    HIỆN:
                    <select class="f-num" id="showProduct">
                    	<option value="50">50 sản phẩm</option>
                        <option value="100">100 sản phẩm</option>
                    </select>
                </div>
                <div class="clear"></div>
                <div class="content">
	                <div style="display:none;text-align:center" id="loading">
	                	<img src="<?php echo Yii::app()->theme->baseUrl?>/frontend/img/loading.gif" />
	                </div>
                	<ul class="list" id="product">
                    <?php 
                    $j=0;
                    if($product !== null):
                    foreach ($product as $key => $value):
                    	if($j%3==0):
                    	?>
                       <li class="first">
                            <img src="<?php echo Yii::app()->baseUrl; ?>/timthumb.php?src=/images/cover/<?php echo $value['CoverPhoto'];?>&amp;h=200&amp;w=216" width="216" height="200"><br>
                            <a href="<?php echo Yii::app()->params['linkGX'];?>/product/<?php echo $value['ProductNameRewrite'];?>"><?php echo $value['ProductName'];?></a><br/>
                            <p class="price"><?php echo number_format($value['Price'], 0, ',', '.');?>đ</p>
                        </li>
                    <?php 
                    	else:
                    ?>
                		<li>
                            <img src="<?php echo Yii::app()->baseUrl; ?>/timthumb.php?src=/images/cover/<?php echo $value['CoverPhoto'];?>&amp;h=200&amp;w=216" width="216" height="200"><br>
                            <a href="<?php echo Yii::app()->params['linkGX'];?>/product/<?php echo $value['ProductNameRewrite'];?>"><?php echo $value['ProductName'];?></a><br/>
                            <p class="price"><?php echo number_format($value['Price'], 0, ',', '.');?>đ</p>
                        </li>
                	<?php
                    	endif;
                        $j++;
                        endforeach;
                        endif;
                    ?>
                    	
                    </ul>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
                <?php
                if($page == true):
                    ?>
                <div class="navi">
                <?php $this->widget('CLinkPager', array(
                    'pages' => $pages,
                    'header' => '',
                    'htmlOptions' => array('id' => 'page','class' => ''),
                    'prevPageLabel' => '&lt; Trang trước',
                    'nextPageLabel' => 'Trang sau &gt;',
                    'firstPageLabel' => '&lt;&lt; Trang đầu',
                    'lastPageLabel' => 'Trang cuối &gt;&gt;',
                    'pageSize' => '9',
                    'maxButtonCount' => '5',
                    'selectedPageCssClass' => 'current',
                )) ?>
                	<!-- <a class="left" href="#"></a>
                    <ul>
                    	<li class="current"><a href="#">1</a></li>
                        <li><a href="#">2</a></li>
                        <li><a href="#">3</a></li>
                        <li><a href="#">4</a></li>
                        <li><a href="#">5</a></li>
                        <li><a href="#">....</a></li>
                        <li><a href="#">100</a></li>
                    </ul>
                    <a class="right" href="#"></a> -->
                </div>
            <?php endif;?>  
            </div>
            <div class="clear"></div>
        </div>
    </div>

